/*
 * Copyright (C) 2011, EADS France
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 */

package xowl.interpreter.frontends.functional;

/**
 *
 * @author Laurent WOUTERS
 */
public class FParserException extends java.lang.Exception {
    protected String document;
    protected int line;
    protected String message;

    public FParserException(String document, int line, String message) {
        this.document = document;
        this.line = line;
        this.message = message;
    }

    @Override public String getMessage() {
        java.lang.StringBuilder buffer = new java.lang.StringBuilder();
        buffer.append(document);
        buffer.append("@");
        buffer.append(line);
        buffer.append(": ");
        buffer.append(message);
        return buffer.toString();
    }
}
